package com.haiyangwang1.flychess;

public class Map1 {
    /**
     * @author LZ
     * @date 2022/5/26 15:21
     */

        //对战地图数组
        int[] map = new int[100];
        //幸运轮盘
        int[] luckyTurn = {6, 23, 40, 55, 69, 83};
        //地雷位置
        int[] landMine = {5, 13, 17, 33, 38, 50, 64, 80, 94};
        //暂停
        int[] pause = {9, 27, 60, 93};
        //时空隧道
        int[] timeTunnel = {20, 25, 45, 63, 72, 88, 90};
        public static void main(String[] args) {
            Map1 map1=new Map1();
            map1.createMap();
            for (int i = 0; i < map1.map.length; i++) {
                System.out.print(map1.map[i]);
            }
        }
        public void createMap() {
            for (int i = 0; i < map.length; i++) {
                for (int k : luckyTurn) {
                    if (i == k)
                    // 数字 1 代表是幸运轮盘
                    {
                        map[i] = 1;
                        break;
                    }
                }
                for (int k : landMine) {
                    if (i == k)
                    //数字 2 代表地雷位置
                    {
                        map[i] = 2;
                        break;  //当找到就结束循环
                    }
                }
                for (int k : pause) {
                    if (i == k)
                    //数字 3 代表暂停
                    {
                        map[i] = 3;
                        break;
                    }
                }
                for (int k : timeTunnel) {
                    if (i == k)
                    //数字 4 代表时空隧道
                    {
                        map[i] = 4;
                        break;
                    }
                }
            }
        }

    }

